<?php
/**
 * Override Mage Order Collection to fix a bug in _getAllIdsSelect
 * 
 * http://www.magentocommerce.com/bug-tracking/issue?issue=10091
 * http://www.magentocommerce.com/bug-tracking/issue?issue=9982
 * http://www.magentocommerce.com/bug-tracking/issue?issue=9500
 */
class StructuredSolutions_Sales_Model_Mysql4_Order_Collection extends Mage_Sales_Model_Mysql4_Order_Collection
{
    /**
     * Reset left join
     *
     * @return Mage_Eav_Model_Entity_Collection_Abstract
     */
    protected function _getAllIdsSelect($limit = null, $offset = null)
    {
        $idsSelect = Mage_Sales_Model_Mysql4_Collection_Abstract::_getAllIdsSelect($limit, $offset);
        $idsSelect->resetJoinLeft();
        return $idsSelect;
    }
}
